<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            padding: 50px 0;
            border: 1px solid;
        }

        div::after {
            content: "这是一个大房子"
        }

        @media all and (max-width:1000px) {
            div {
                background: red;
            }

            div::after {
                content: "哇，房子很大，还有一个大花园"
            }
        }

        @media all and (max-width:800px) {
            div {
                background: blue;
            }

            div::after {
                content: "房子变小了，但是能放下一张双人床"
            }
        }

        @media all and (max-width:500px) {
            div {
                background: blue;
            }

            div::after {
                content: "房子再一次变小了，只能放下一张单人床"
            }
        }

        @media all and (max-width:300px) {
            div {
                background: gray;
            }

            div::after {
                content: "房子太小了，只能站一个人"
            }
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>
